from django.db import models
from datetime import datetime
# Create your models here.

class SeoSysUser(models.Model):
    user_id = models.BigIntegerField( verbose_name='用户id', primary_key=True)
    username = models.CharField(max_length=150, verbose_name='用户名',default='')
    password = models.CharField(max_length=150, verbose_name='密码',default='')
    salt = models.CharField(max_length=150, verbose_name='salt值',default='')
    email = models.CharField(max_length=150, verbose_name='邮箱',default='')
    mobile = models.CharField(max_length=150, verbose_name='手机号',default='')
    status = models.IntegerField( verbose_name='状态',default='')
    dept_id = models.BigIntegerField( verbose_name='部门id',default='')
    create_time = models.DateTimeField(default=datetime.now, verbose_name='创建时间')

    class Meta:
        db_table = 'sys_user'
        verbose_name = '公司信息'
        verbose_name_plural = verbose_name

    def __str__(self):
        return str(self.id)


class SeoUserBusiness(models.Model):
    id = models.BigIntegerField(verbose_name='id',default='',primary_key=True)
    sys_user_id = models.BigIntegerField(verbose_name='用户id',default='')
    company = models.CharField(verbose_name='公司名',default='',max_length=50)
    start_time = models.DateTimeField(verbose_name='上线时间',default=datetime.now)
    end_time = models.DateTimeField(verbose_name='下线时间',default=datetime.now)
    identity = models.CharField(verbose_name='用户标识',default='',max_length=50)
    operate_time = models.DateTimeField(verbose_name='操作时间',default=datetime.now)
    creater = models.CharField(verbose_name='创建人',default='',max_length=50)
    operater = models.CharField(verbose_name='操作人',default='',max_length=50)
    industry = models.CharField(verbose_name='行业',default='', max_length=50)
    mainBussiness = models.CharField(verbose_name='主营业务',default='',max_length=150)
    region = models.CharField(verbose_name='地域',default='',max_length=50)
    contentNum = models.IntegerField(verbose_name='每天最多发布数量',default='')


    class Meta:
        db_table = 'ys_user_business'
        verbose_name = '公司信息'
        verbose_name_plural = verbose_name

    def __str__(self):
        return str(self.id)
